The present invention relates to a method and system to encode and decode typographic characters, and more particularly to a method and system to encode typographic characters into two digit base ten values and to decode such values to typographic characters.
In order to facilitate the exchange of character data between computing devices, such devices typically encode characters using a standard mapping scheme. Each character is mapped to a numeric value. The numeric values are then exchanged. The most common mapping scheme used to exchange character data between computing devices is the American Standard Code for Information Interchange (xe2x80x9cASCIIxe2x80x9d).
The standard ASCII scheme uses codes consisting of seven binary digits to map typographic characters including upper and lower case English letters, numbers, and punctuation symbols as well as control characters into numeric values. Each character is mapped to an ASCII code having a value between zero (0) and one-hundred and twenty-seven (127).
The seven binary digit ASCII scheme capitalizes on binary computational features of digital computers, and thus exhibits numerous base two-symmetries. For example, all characters in the English alphabet are mapped to codes having base ten (decimal) values between sixty-five (65) and one-hundred and twenty-two (122). Represented as binary values, these codes all have a xe2x80x9c1xe2x80x9d in bit six. Upper case letters in the English alphabet are mapped to ASCII codes having decimal values between sixty five (65) and ninety (90). Represented as binary values, these codes all have values of xe2x80x9c0xe2x80x9d in bit five. Each lower case character in the English alphabet is mapped to a code having a value corresponding to the code for the upper case character, incremented by thirty-two. Thus, lower case letters in the alphabet are mapped to decimal values between ninety-seven and one-hundred and twenty-two. Represented as binary values, lower case character values all have values of xe2x80x9c1xe2x80x9d in bit five. Thus, upper case characters may be transformed into lower case characters (and vice-versa) by simply logically inverting bit five of the ASCII code. Similarly, other base-two symmetries may be observed.
Seven binary digit ASCII codes, however, may not be as elegantly represented and manipulated using base ten (decimal) values. Moreover, many of the base-two symmetries cannot be effectively exploited using base ten arithmetic. For example, adding or subtracting a value of thirty-two to the ASCII code representing an upper or lower case character does not present any base ten computational advantages.
More significantly, many of the most frequently used characters are represented by ASCII codes having values between one-hundred (100) and one-hundred and twenty-seven (127). Specifically, English lower case letters xe2x80x9cdxe2x80x9d through xe2x80x9czxe2x80x9d are mapped to ASCII codes between one-hundred (100) and one-hundred and twenty-two (122). Thus, representing these characters using the traditional ASCII scheme requires three base ten digits. Other ASCII codes, on the other hand, may be represented with one or two base ten digits.
Presently, voice mail systems exchange text data represented by ASCII codes using standard defined dual tone multi frequency (xe2x80x9cDTMFxe2x80x9d) signals. A method used by voice mail systems to exchange character data is disclosed in U.S. provisional patent application, serial No. 60/029,933, and a U.S. application claiming benefits therefrom, filed concurrently herewith, naming Gary Longster, Janusz Maruszak, Mervyn D""Cruz, and Brian Oliver as inventors and assigned to the assignee of the present application, and incorporated by reference herein. This method requires encoding ASCII codes using existing DTMF tones. Moreover, the method reserves the use of certain DTMF tones for use as delimiters and control codes. As such, only DTMF tones representing numerals xe2x80x9c0-9xe2x80x9d are available for exchanging ASCII encoded data. Using only the ten available digits, conventional ASCII codes could further be encoded to form signals comprised of one, two or three sequential and distinct DTMF tones. Each DTMF encoded ASCII code could be encoded using DTMF tones corresponding to the decimal value of the ASCII code. For example, the letter xe2x80x9czxe2x80x9d, mapped to an ASCII code of 122 could be encoded using sequentially produced DTMF tones xe2x80x9c1xe2x80x9d, xe2x80x9c2xe2x80x9d and xe2x80x9c2xe2x80x9d.
As will be appreciated, however, the use of the base ten representation of conventional ASCII codes would require using three sequential DTMF tones for many common English characters. Further, variable length DTMF codes having one, two or three tones requires properly delimiting the end of one encoded character from the next. This may require the use of additional tones.
U.S. Pat. No. 5,522,089 naming Kikinis et al. as inventors discloses a method for encoding all standard ASCII coded characters using two sequential DTMF tones. However, all available DTMF tones including digits xe2x80x9c0xe2x80x9d-xe2x80x9c9xe2x80x9d; xe2x80x9c*xe2x80x9d; xe2x80x9c#xe2x80x9d; and defined DTMF tones xe2x80x9cAxe2x80x9d to xe2x80x9cDxe2x80x9d are utilized. Thus, a total of two-hundred and fifty six possible pairs of sequential tones exist. As will be appreciated, this method does not lend itself to reserving some DTMF tones for use as special symbols.
Accordingly, the present invention attempts to overcome some of the disadvantages of known techniques to encode typographic characters.
It is an object of the present invention, to map ASCII codes for common typographic characters to two digit (base ten) codes.
Advantageously, the present invention, allows codes representing typographic characters to be reproduced with two sequential DTMF tones, with each tone chosen from the conventional DTMF tones representing digits xe2x80x9c0xe2x80x9d to xe2x80x9c9xe2x80x9d.
In accordance with an aspect of the present invention, there is provided a method of numerically encoding a typographic character using a computing device, including the steps of: a. determining a value of a numeric standard ASCII code representing the character; and b. for the determined value greater than ninety-nine, mapping the character using the ASCII code to a two decimal digit numeric code having a value between zero and ninety-nine, using a defined mapping so that the numeric code uniquely identifies the character. c. for the determined value less than or equal to ninety-nine, mapping the ASCII code to a two decimal digit numeric code having a value between zero and ninety-nine, the numeric code having a value different than the ASCII code, using the defined mapping so that the numeric code uniquely identifies the character, wherein steps b. and c. further comprise subtracting an offset from the determined value to form the numeric code.
In accordance with another aspect of the present invention, there is provided a system of encoding a typographic symbol including: a. an input port for receiving a digital representation of a numeric standard ASCII code representing the character; and b. a mapper in communication with the input port, for mapping the ASCII code to a numeric code having a value between zero and ninety-nine, the numeric code uniquely identifying the character; c. an output port for outputting a digital representation of the numeric code, wherein the mapper is adapted to subtract an offset from the ASCII code to form the numeric code.
In accordance with a further aspect of the present invention, there is provided a method for decoding a two decimal digit numeric code to form a character, including: a. receiving the two decimal digit numeric code; b. mapping the two decimal digit numeric code to an ASCII code, wherein step b. further comprises adding a value of thirty-two to a value of the numeric code to form the ASCII code.